/*
 * Created on May 13, 2004
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License");  you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * http//www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 *
 * The Original Code is MAPONTO.
 *
 * The Initial Developer of the Original Code is University of Toronto. Portions
 * created by University of Toronto are Copyright (C) 2004.  All Rights Reserved.
 *
 * MAPONTO was developed by Knowledge Management Lab
 * (http//www.cs.toronto.edu/km) at the University of Toronto Department of 
 * Computer Science. Current information about MAPONTO can be obtained at 
 * http//resi.ai.toronto.edu:8080
 *
 */

 /*
  * Contributor(s): Yuan An yuana@cs.toronto.edu
 */
package main.logger;


import org.apache.log4j.*;

/**Test LoggerSetup.
 * 
 * @author Yuan An
 */
public class SimpleLogger{
	
	static{
		LoggerSetup.enable(); //enabling log4j.
	}
	static Logger log = Logger.getLogger(SimpleLogger.class);
    
	public static void main(String[] args) {
		
		log.info("Starting up...");
        
		//log.setLevel(Level.WARN);
		log.info("This message should not appear!");
        
		try {
			// Divide by zero.
			int x = 5;
			int y = 20 / (5 - x);
		} catch (Exception e) {
			log.error("Oops!", e);
		}
	}
}
